home *** CD-ROM | disk | FTP | other *** search
- { Turbo Pascal procedure to retrieve command line parameters }
- { Copywrite 1984 Micheal A. Covington }
-
- type parmtype = string[127];
-
- procedure getparm(var s:parmtype);
-
- { Returns first avalialbe parameter from Dos command
- line and removes it so that the next parameter will
- be returned on the next call. If no more parameters
- are available, a null string is returned. }
-
- var parms: parmtype absolute CSEG:$80;
-
- begin
- s := '';
- { parm[1] exists even when the length is zero }
- while (length(parms) > 0) and (parms[1] = ' ') do
- delete(parms,1,1);
- while (length(parms) > 0) and (parms[1] <> ' ') do begin
- s := s + parms[1]; delete(parms,1,1)
- end;
- end;
-
-
-